<?php

use Illuminate\Routing\Router;

Admin::routes();

Route::group([
    'prefix'        => config('admin.route.prefix'),
    'namespace'     => config('admin.route.namespace'),
    'middleware'    => config('admin.route.middleware'),
], function (Router $router) {

    $router->get('/', 'HomeController@index')->name('admin.home');

    $router->any('products/spec', 'ProductsController@spec'); // 规格
    $router->any('goods/skus', 'ProductsController@skus'); // sku 生成
    $router->any('goods/skus/edit', 'ProductsController@skusEdit'); // sku 编辑
    $router->resource('express', ExpressController::class);
    $router->resources([
        'users' => UsersController::class,
        'moneylogs' => MoneylogsController::class,
        'scorelogs' => ScorelogsController::class,
        'feedbacks' =>  FeedbacksController::class,
        'categories' => CategoriesController::class,
        'products' => ProductsController::class,
        'orders' => OrdersController::class,
        'banners' => BannersController::class,
        'ordertips' => OrderTipsController::class,
        'productcomments' => ProductCommnetController::class,
        'messages' =>  MessagesController::class,
        'configs' =>  RuleController::class,
        'orderrefunds' =>  OrderRefundController::class,
    ]);
});
